class NS_NO_VTABLE nsIDNSService : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDNSSERVICE_IID)
/**
* kicks off an asynchronous host lookup.
*
* @param aHostName
* the hostname or IP-address-literal to resolve.
* @param aFlags
* a bitwise OR of the RESOLVE_ prefixed constants defined below.
* @param aListener
* the listener to be notified when the result is available.
* @param aListenerEventTarget
* optional parameter (may be null). if non-null, this parameter
* specifies the nsIEventTarget of the thread on which the listener's
* onLookupComplete should be called. however, if this parameter is
* null, then onLookupComplete will be called on an unspecified
* thread (possibly recursively).
*
* @return An object that can be used to cancel the host lookup.
*/
/* nsICancelable asyncResolve (in AUTF8String aHostName, in unsigned long aFlags, in nsIDNSListener aListener, in nsIEventTarget aListenerEventTarget); */
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsDNSService : public nsIDNSService
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDNSSERVICE
nsDNSService();
private:
~nsDNSService();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDNSService, nsIDNSService)
nsDNSService::nsDNSService()
{
/* member initializers and constructor code */
}
nsDNSService::~nsDNSService()
{
/* destructor code */
}
/* nsICancelable asyncResolve (in AUTF8String aHostName, in unsigned long aFlags, in nsIDNSListener aListener, in nsIEventTarget aListenerEventTarget); */